<%-- 
    Document   : faixa.ip
    Created on : 30/07/2010, 19:26:18
    Author     : atila
--%>
<%@page import="org.madmac.servlet.action.Action"%>
<%@include file="/common_pages/taglib.jsp" %>

<%@page import="org.madmac.servlet.form.Form"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- VERIFICA SE O USUÁRIO ESTÁ COM O COOKIE VÁLIDO, SENÃO O REDIRECIONA PARA A PÁGINA DE LOGIN -->
<%@ include file="/log/verify_login.jsp" %>
<!-- VERIFICA SE O USUÁRIO TEM PERMISSÃO DE ACESSAR A PÁGINA, SENÃO REDIRECIONA PARA A PÁGINA INICIAL -->
<%@include file="/log/adm_page.jsp" %>

<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>Faixa IP</title>
      <link rel="icon" href="/madmac/favicon.ico" type="image/x-icon" />
      <link rel="shortcut icon" href="/madmac/favicon.ico" type="image/x-icon" />
      <link rel="stylesheet" href="/madmac/menu_madmac_files/cbcscbmenu_madmac.css" type="text/css" />
      <link rel="stylesheet" href="/madmac/estilos/madmac_tables.css" type="text/css" />
      <link rel="stylesheet" href="/madmac/estilos/madmac_inputs.css" type="text/css" />
		<link rel="stylesheet" href="/madmac/estilos/madmac_others.css" type="text/css" />
		<link rel="stylesheet" href="/madmac/estilos/madmac_divs.css" type="text/css" />
      <script type="text/javascript" src="/madmac/madmacproject.js"></script>
		<script type="text/javascript" language="javascript" src="/madmac/paginacao/js/jquery.js"></script>
		<%
		if (request.getAttribute("form") != null) {
				if ( Form.ADD.equals(request.getAttribute("form")) ) {
		%>
		<script type="text/javascript" src="/madmac/common_pages/js/mad_hints.js"></script>

      <script language="JavaScript" type="text/javascript">
			mad_hint_texto += 'A faixa de IP deve ser composta pelo IP mais a mascara.<br/>';
			mad_hint_texto += 'Por exemplo:<br/><ul><li><b>10.50.0.5/8</b> ou</li><li><b>192.168.1.2/16</b></li></ul>';
		</script>
		<%
				}
			}
		%>
	</head>
   <body>
      <div class="logotype"><img src="/madmac/madmac-logo-1.0.1.png" height="120%" alt="MAD MAC"></div>

      <div class="menu_principal">
         <%@ include file="/common_pages/menu.jsp" %>
      </div>

      <div class="search_mac">
         <%@include file="/common_pages/search_mac.jsp" %>
      </div>

      <div class="corpo">
			<%
			if (request.getAttribute("action") != null) {
				if (Action.LIST.equals(request.getAttribute("action"))) {
					%>
					<c:import url="/faixa.ip/faixa.ipList.jsp"></c:import>
					<%
				} else if (Action.ERROR.equals(request.getAttribute("action"))) {
					%>
					<%@include file="/common_pages/erro.jsp" %>
					<%
				}
			} else if (request.getAttribute("form") != null) {
				if ( Form.ADD.equals(request.getAttribute("form")) ) {
					%>
					<c:import url="/faixa.ip/faixa.ipCreate.jsp"></c:import>
					<%
				}
			}
			%>
		</div>
		<div id="mad_hint">
			<p id="hint_text"></p>
		</div>
      <div class="footer_madmac">
         <%@include file="/common_pages/footer.jsp" %>
      </div>
   </body>
</html>